package de.akquinet.android.archetypes.tatt.control;

import de.akquinet.android.archetypes.tatt.entity.*;
import de.akquinet.android.archetypes.tatt.helper.UserDBHelper;

public class UserControl {
	private User mainUser;

	/**
	 * 
	 * @param user
	 */
	public boolean login(User user) {
		// TODO - implement UserControl.login
		// throw new UnsupportedOperationException();
		UserDBHelper userDBHelper = new UserDBHelper();
		mainUser = userDBHelper.getUser(user.getUsername(), user.getPassword());
		if(mainUser !=null)return true;
		return false;
	}

	/**
	 * 
	 * @param student
	 */
	public void generateReportStudent(Student student) {
		// TODO - implement UserControl.generateReportStudent
		throw new UnsupportedOperationException();
	}

	public User getUser() {
		// TODO Auto-generated method stub
		return mainUser;
	}

}